/**
 * @author mapeng
 * @version 2017-05-17
 */

(function(doc, win) {

    var pageVariables = {"shopId" : ""};

    $(doc).on("pageInit", "#weixinChangeSuccessPage", function(e, pageId, $page, isBack , isForward) {
        initPage();
    });
    bindEvent();

    function initPage(){

       var params = CommonUtil.takeOutParamObject() || {};
       pageVariables.shopId = params.shopId;
    }

    function bindEvent(){

        //完成
        $(document).on("click","#weixinChangeSuccessPage .header a[name='finish']",function(e){
            var cache = CommonUtil.takeOutParamObject() || {};
            cache.shopId = pageVariables.shopId;
            cache.handleBack = "load";
            CommonUtil.injectParamObject(cache);
            $.router.load("weixin_manage.html",true);
        });
    }

})(document, window);